import React, { Component } from 'react'; //imrc
import PropTypes from 'prop-types'

class Feture  extends Component { //cc

    constructor() {
        super();
        this.handleClick = this.handleClick.bind(this)
    }

    render() {
        return (
            <div onClick={this.handleClick}>{this.props.content}</div>
        );
    }

    handleClick(){
        this.props.deleteItem(this.props.index)
    }

}

Feture.propTypes= {
    content:PropTypes.string.isRequired,
    deleteItem:PropTypes.func,
    index:PropTypes.number
}

Feture.defaultProps = {
    content:'glgg'
}

export default Feture;